from rest_framework import routers
from django.urls import path, include

from MirrorCore.views.Article import ArticleViewSet
from MirrorCore.views.Badge import BadgeViewSet, ArticleBadgeViewSet
from MirrorCore.views.Collection import CollectionViewSet
from MirrorCore.views.Essay import EssayViewSet
from MirrorCore.views.User import UserViewSet

router = routers.DefaultRouter()

router.register(r'articles', ArticleViewSet, basename="article")
router.register(r'badges', BadgeViewSet, basename="badge")
router.register(r'essays', EssayViewSet, basename="essay")
router.register(r'articlebadges',ArticleBadgeViewSet,basename='articlebadge')
router.register(r'users',UserViewSet,basename='user')
router.register(r'collections',CollectionViewSet,basename='collection')
urlpatterns = [
    path('', include(router.urls)),
    path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
    # path('', views.api_root),
]
